package cn.swing.main.srv.cv.onnx;

import java.util.Arrays;

public class Detection {

    private String label;

    private Integer key;

    private float[] bbox;

    private float confidence;

    public Detection(String label, Integer key, float[] bbox, float confidence) {
        this.label = label;
        this.key = key;
        this.bbox = bbox;
        this.confidence = confidence;
    }

    // Getters
    public String getLabel() {
        return label;
    }

    public Integer getKey() {
        return key;
    }

    public float[] getBbox() {
        return bbox;
    }

    public float getConfidence() {
        return confidence;
    }

    @Override
    public String toString() {
        return "Detection{" +
                "labelString='" + label + '\'' +
                ", key='" + key + '\'' +
                ", bbox=" + Arrays.toString(bbox) +
                ", confidence=" + confidence +
                '}';
    }

}
